@echo off
setlocal

@rem NOTE: This script uses exit /B to exit the batch file with an error code.
@rem exit /B simply sets the ERRORLEVEL variable and stops batch processing.
@rem If cygwin or msys are being used they execute batch files using cmd.exe
@rem which doesn't return the last value of ERRORLEVEL, cmd.exe returns the 
@rem last real exit code it has seen.  So to run this using cygwin or msys
@rem this batch should be executed from a wrapper batch file like this...
@rem
@rem run_batch.bat
@rem 
@rem set SCRIPT=%1
@rem shift
@rem %SCRIPT% %*
@rem exit %ERRORLEVEL%
@rem

@rem Save the directory this batch file is located in.
set BAT_DIR=%~d0%~p0
@rem Store the CScript intepreter and flags.
set SCRIPT=CScript /nologo

%SCRIPT% %BAT_DIR%\import_to_itunes.wsf %*
exit /B %ERRORLEVEL%
